package test;

import java.util.Scanner;

public class GradeChecker02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入成绩：");
        int grade = scanner.nextInt();
        // 使用 switch 语句判断成绩等级
        String gradeLevel;
        switch (grade / 10) {
            case 10:
            case 9:
                gradeLevel = "优秀";
                break;
            case 8:
                gradeLevel = "良好";
                break;
            case 7:
                gradeLevel = "中等";
                break;
            case 6:
                gradeLevel = "及格";
                break;
            default:
                gradeLevel = "不及格";
        }
        System.out.println("成绩等级为：" + gradeLevel);
    }
}